Commit 8997cfc0 by huluobin

update

parent 70673022
...@@ -9,6 +9,7 @@ import com.blt.other.auth.model.OaCompany; ...@@ -9,6 +9,7 @@ import com.blt.other.auth.model.OaCompany;
import com.blt.other.auth.model.OaDepartment; import com.blt.other.auth.model.OaDepartment;
import com.blt.other.auth.service.IOaCompanyService; import com.blt.other.auth.service.IOaCompanyService;
import com.blt.other.auth.service.IOaDepartmentService; import com.blt.other.auth.service.IOaDepartmentService;
import com.google.common.collect.Lists;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* <p> * <p>
...@@ -78,8 +80,9 @@ public class CostReviewerController { ...@@ -78,8 +80,9 @@ public class CostReviewerController {
@GetMapping("/modifyDepartmentReviewer") @GetMapping("/modifyDepartmentReviewer")
public CostResult<Void> modifyDepartmentReviewer(@RequestParam Integer userId, public CostResult<Void> modifyDepartmentReviewer(@RequestParam Integer userId,
@RequestParam Integer oaDepartmentId, @RequestParam Integer oaDepartmentId,
@RequestParam List<Integer> departmentReviewerUserIds) { @RequestParam String departmentReviewerUserIds) {
oaDepartmentService.modifyFinancialReviewer(userId, oaDepartmentId, departmentReviewerUserIds); oaDepartmentService.modifyFinancialReviewer(userId, oaDepartmentId, Lists.newArrayList(departmentReviewerUserIds.split(","))
.stream().map(Integer::valueOf).collect(Collectors.toList())));
return CostResult.success(); return CostResult.success();
} }
......
...@@ -50,9 +50,19 @@ public interface CostTypeKindDao { ...@@ -50,9 +50,19 @@ public interface CostTypeKindDao {
* @param companyName * @param companyName
* @return * @return
*/ */
@Deprecated
CostTypeKindDomain selectByKindNameAndCompanyName(String kindName, String companyName); CostTypeKindDomain selectByKindNameAndCompanyName(String kindName, String companyName);
/** /**
* 根据费用小类名称和公司no获取种类信息
* @param kindName
* @param companyNo
* @return
*/
CostTypeKindDomain selectByKindNameAndCompanyNo(String kindName, String companyNo);
/**
* 新增费用种类记录 * 新增费用种类记录
* @param ctkd * @param ctkd
* @return * @return
......
...@@ -7,10 +7,7 @@ import com.blt.other.commons.utils.CurUtils; ...@@ -7,10 +7,7 @@ import com.blt.other.commons.utils.CurUtils;
import com.blt.other.commons.utils.DateTimeUtil; import com.blt.other.commons.utils.DateTimeUtil;
import com.blt.other.commons.utils.HttpUtil; import com.blt.other.commons.utils.HttpUtil;
import com.blt.other.commons.utils.PathUtil; import com.blt.other.commons.utils.PathUtil;
import com.blt.other.cost.dao.CostDao; import com.blt.other.cost.dao.*;
import com.blt.other.cost.dao.CostDetailDao;
import com.blt.other.cost.dao.CostLogDao;
import com.blt.other.cost.dao.CostTypeKindDao;
import com.blt.other.cost.service.CostApiService; import com.blt.other.cost.service.CostApiService;
import com.blt.other.cost.service.CostService; import com.blt.other.cost.service.CostService;
import com.blt.other.cost.service.UserCostFinansysService; import com.blt.other.cost.service.UserCostFinansysService;
...@@ -26,6 +23,7 @@ import org.springframework.stereotype.Service; ...@@ -26,6 +23,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
...@@ -55,6 +53,8 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -55,6 +53,8 @@ public class CostApiServiceImpl implements CostApiService {
private String getExchangeRateApi; private String getExchangeRateApi;
@Autowired @Autowired
CostLogDao costLogDao; CostLogDao costLogDao;
@Resource
CostCompanyDao costCompanyDao;
@Override @Override
@Transactional @Transactional
...@@ -280,7 +280,9 @@ public class CostApiServiceImpl implements CostApiService { ...@@ -280,7 +280,9 @@ public class CostApiServiceImpl implements CostApiService {
sqlParam.setKindName("工资"); sqlParam.setKindName("工资");
sqlParam.setCompanyName(wageCostDto.getCompanyName()); sqlParam.setCompanyName(wageCostDto.getCompanyName());
CostTypeKindDomain costTypeKindDomain = costTypeKindDao.selectByKindNameAndCompanyName("工资", wageCostDto.getCompanyName());
CostCompanyDomain costCompany = costCompanyDao.selectByName(wageCostDto.getCompanyName());
CostTypeKindDomain costTypeKindDomain = costTypeKindDao.selectByKindNameAndCompanyNo("工资", costCompany.getCompanyNo());
costDomain.setTypeNo(costTypeKindDomain.getTypeNo()); costDomain.setTypeNo(costTypeKindDomain.getTypeNo());
costDomain.setTypeName(costTypeKindDomain.getTypeName()); costDomain.setTypeName(costTypeKindDomain.getTypeName());
......
...@@ -83,6 +83,16 @@ ...@@ -83,6 +83,16 @@
AND AND
cost_form = #{costForm} cost_form = #{costForm}
</select> </select>
<select id="selectByKindNameAndCompanyNo" resultType="com.blt.other.database.model.CostTypeKindDomain">
SELECT
*
FROM
cost_type_kind
WHERE
kind_name = #{kindName}
AND
company_no = #{companyNo}
</select>
<update id="update" parameterType="com.blt.other.database.model.CostTypeKindDomain"> <update id="update" parameterType="com.blt.other.database.model.CostTypeKindDomain">
UPDATE UPDATE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment