Commit a7db52e0 by huluobin

# 更新

parent 0c255e49
......@@ -94,5 +94,13 @@
and t2.id is null;
</select>
<select id="selectByTypeNameAndAccountSubjectName" resultType="com.blt.other.database.model.CostTypeDomain">
select *
from bailun_other.cost_type t1
left join bailun_other.accounting_subject t2 on t1.accounting_subject_id = t2.id
where t1.type_name = #{typeName}
and t2.name = #{accountSubjectName}
limit 1;
</select>
</mapper>
......@@ -270,7 +270,7 @@ public class OtherApplicationTests {
@Test
public void importCost() {
CostListener costListener = new CostListener();
EasyExcel.read("/Users/huluobin/Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688853793439460/Cache/File/2021-01/1月份费用系统数据更新.xls", CostItem.class, costListener).sheet().doRead();
EasyExcel.read("/Users/huluobin/Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688853793439460/Cache/File/2021-01/1月份费用系统数据更新V1.xls", CostItem.class, costListener).sheet().doRead();
}
@Data
......@@ -322,6 +322,11 @@ public class OtherApplicationTests {
costDomain.setTypeName(item.getTypeName());
CostTypeDomain costTypeDomain = costTypeDao.selectByTypeNameAndAccountSubjectName(item.getTypeName(), item.getAccountSubjectName());
if (costTypeDomain != null) {
costDomain.setTypeId(costTypeDomain.getId());
}
costDomain.setLastModifyDate(LocalDateTime.now());
costDao.updateById(costDomain);
});
}
......
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