Commit 8997cfc0 by huluobin

update

parent 70673022
......@@ -9,6 +9,7 @@ import com.blt.other.auth.model.OaCompany;
import com.blt.other.auth.model.OaDepartment;
import com.blt.other.auth.service.IOaCompanyService;
import com.blt.other.auth.service.IOaDepartmentService;
import com.google.common.collect.Lists;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
......@@ -78,8 +80,9 @@ public class CostReviewerController {
@GetMapping("/modifyDepartmentReviewer")
public CostResult<Void> modifyDepartmentReviewer(@RequestParam Integer userId,
@RequestParam Integer oaDepartmentId,
@RequestParam List<Integer> departmentReviewerUserIds) {
oaDepartmentService.modifyFinancialReviewer(userId, oaDepartmentId, departmentReviewerUserIds);
@RequestParam String departmentReviewerUserIds) {
oaDepartmentService.modifyFinancialReviewer(userId, oaDepartmentId, Lists.newArrayList(departmentReviewerUserIds.split(","))
.stream().map(Integer::valueOf).collect(Collectors.toList())));
return CostResult.success();
}
......
......@@ -50,9 +50,19 @@ public interface CostTypeKindDao {
* @param companyName
* @return
*/
@Deprecated
CostTypeKindDomain selectByKindNameAndCompanyName(String kindName, String companyName);
/**
* 根据费用小类名称和公司no获取种类信息
* @param kindName
* @param companyNo
* @return
*/
CostTypeKindDomain selectByKindNameAndCompanyNo(String kindName, String companyNo);
/**
* 新增费用种类记录
* @param ctkd
* @return
......
......@@ -7,10 +7,7 @@ import com.blt.other.commons.utils.CurUtils;
import com.blt.other.commons.utils.DateTimeUtil;
import com.blt.other.commons.utils.HttpUtil;
import com.blt.other.commons.utils.PathUtil;
import com.blt.other.cost.dao.CostDao;
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.dao.*;
import com.blt.other.cost.service.CostApiService;
import com.blt.other.cost.service.CostService;
import com.blt.other.cost.service.UserCostFinansysService;
......@@ -26,6 +23,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
......@@ -55,6 +53,8 @@ public class CostApiServiceImpl implements CostApiService {
private String getExchangeRateApi;
@Autowired
CostLogDao costLogDao;
@Resource
CostCompanyDao costCompanyDao;
@Override
@Transactional
......@@ -280,7 +280,9 @@ public class CostApiServiceImpl implements CostApiService {
sqlParam.setKindName("工资");
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.setTypeName(costTypeKindDomain.getTypeName());
......
......@@ -83,6 +83,16 @@
AND
cost_form = #{costForm}
</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
......
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